-- GENERATED SPELL FOR [Entropic Eye] --


function spell0_20868(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(36712,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 585, 1)
end

function spell1_20868(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(38823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 560, 1)
end

function spell2_20868(pUnit, Event) --@Chaos Breath,n/a--
pUnit:FullCastSpellOnTarget(36677,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 553, 1)
end

function spell3_20868(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(36711,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 610, 1)
end

function spell4_20868(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(38824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 569, 1)
end

function spell5_20868(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(36710,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 2312, 1)
end

function spell6_20868(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(38826,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 2306, 1)
end

function spell7_20868(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(36713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 607, 1)
end

function spell8_20868(pUnit, Event) --@Poison Bolt,n/a--
pUnit:FullCastSpellOnTarget(38827,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 610, 1)
end

function spell9_20868(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(36714,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 598, 1)
end

function spell10_20868(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(38825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 628, 1)
end

function spell11_20868(pUnit, Event) --@Tentacle Cleave,n/a--
pUnit:FullCastSpellOnTarget(36664,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 0, 1)
end

function spell12_20868(pUnit, Event) --@Tentacle Cleave,n/a--
pUnit:FullCastSpellOnTarget(38816,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20868', 601, 1)
end

function Sorts_20868(pUnit, Event)
local choix_sorts_20868 = math.random(0, 12)
if choix_sorts_20868 == 0 then
pUnit:RegisterEvent('spell0_20868', 1, 1)
end
if choix_sorts_20868 == 1 then
pUnit:RegisterEvent('spell1_20868', 1, 1)
end
if choix_sorts_20868 == 2 then
pUnit:RegisterEvent('spell2_20868', 1, 1)
end
if choix_sorts_20868 == 3 then
pUnit:RegisterEvent('spell3_20868', 1, 1)
end
if choix_sorts_20868 == 4 then
pUnit:RegisterEvent('spell4_20868', 1, 1)
end
if choix_sorts_20868 == 5 then
pUnit:RegisterEvent('spell5_20868', 1, 1)
end
if choix_sorts_20868 == 6 then
pUnit:RegisterEvent('spell6_20868', 1, 1)
end
if choix_sorts_20868 == 7 then
pUnit:RegisterEvent('spell7_20868', 1, 1)
end
if choix_sorts_20868 == 8 then
pUnit:RegisterEvent('spell8_20868', 1, 1)
end
if choix_sorts_20868 == 9 then
pUnit:RegisterEvent('spell9_20868', 1, 1)
end
if choix_sorts_20868 == 10 then
pUnit:RegisterEvent('spell10_20868', 1, 1)
end
if choix_sorts_20868 == 11 then
pUnit:RegisterEvent('spell11_20868', 1, 1)
end
if choix_sorts_20868 == 12 then
pUnit:RegisterEvent('spell12_20868', 1, 1)
end
end

function mob20868_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20868', math.random(1500, 3000), 1)
end

function mob20868_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20868_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20868_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20868, 1, 'mob20868_Action')
RegisterUnitEvent(20868, 2, 'mob20868_Leave')
RegisterUnitEvent(20868, 3, 'mob20868_Kill')
RegisterUnitEvent(20868, 4, 'mob20868_Die')
